package chapter1.No1_10线程的优先级.a线程优先级的继承特性;

/**
 * !
 *
 * @author liujian
 * @version 2016/11/10 0010
 */
public class MyThread extends Thread {

    @Override
    public void run() {
        System.out.println("MyThread线程的优先级别为："+this.getPriority());
        MyThread2 m2 = new MyThread2();
        m2.start();
    }

    public static void main(String[] args) {
        MyThread m1 = new MyThread();
        m1.setPriority(3);
        m1.start();
    }
}

class MyThread2 extends Thread{
    @Override
    public void run() {
        System.out.println("MyThread2线程的优先级别为："+this.getPriority());
    }
}

